<?php
/**
 * User: xzq
 * Date: 2018/8/14
 * Time: 14:07
 */

namespace app\library\home;
use app\common\controller\Common;
use app\library\model\User as UserModel;

class Home extends Common
{
    public function _initialize(){
        parent::_initialize();
        //$this->isLogin();
    }

    /**
     * 判断是否登录
     */
    public function isLogin(){
        $user = new UserModel();
        if (!$user->isLogin()) {
            $this->redirect(url('login/index', '', true, true));
        }
    }
}